Integrand size = 31, antiderivative size = 399 \[ \int \frac {\cot ^2(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=-\frac {\left (a^4 A-6 a^2 A b^2+A b^4+4 a^3 b B-4 a b^3 B\right ) x}{\left (a^2+b^2\right )^4}-\frac {(4 A b-a B) \log (\sin (c+d x))}{a^5 d}+\frac {b^2 \left (20 a^6 A b+24 a^4 A b^3+16 a^2 A b^5+4 A b^7-10 a^7 B-5 a^5 b^2 B-4 a^3 b^4 B-a b^6 B\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{a^5 \left (a^2+b^2\right )^4 d}-\frac {b \left (3 a^2 A+4 A b^2-a b B\right )}{3 a^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}-\frac {A \cot (c+d x)}{a d (a+b \tan (c+d x))^3}-\frac {b \left (2 a^4 A+8 a^2 A b^2+4 A b^4-3 a^3 b B-a b^3 B\right )}{2 a^3 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}-\frac {b \left (a^6 A+13 a^4 A b^2+12 a^2 A b^4+4 A b^6-6 a^5 b B-3 a^3 b^3 B-a b^5 B\right )}{a^4 \left (a^2+b^2\right )^3 d (a+b \tan (c+d x))} \]
[Out]
Time = 1.73 (sec) , antiderivative size = 399, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {3690, 3730, 3732, 3611, 3556} \[ \int \frac {\cot ^2(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=-\frac {(4 A b-a B) \log (\sin (c+d x))}{a^5 d}-\frac {b \left (3 a^2 A-a b B+4 A b^2\right )}{3 a^2 d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}-\frac {b \left (2 a^4 A-3 a^3 b B+8 a^2 A b^2-a b^3 B+4 A b^4\right )}{2 a^3 d \left (a^2+b^2\right )^2 (a+b \tan (c+d x))^2}-\frac {x \left (a^4 A+4 a^3 b B-6 a^2 A b^2-4 a b^3 B+A b^4\right )}{\left (a^2+b^2\right )^4}-\frac {b \left (a^6 A-6 a^5 b B+13 a^4 A b^2-3 a^3 b^3 B+12 a^2 A b^4-a b^5 B+4 A b^6\right )}{a^4 d \left (a^2+b^2\right )^3 (a+b \tan (c+d x))}+\frac {b^2 \left (-10 a^7 B+20 a^6 A b-5 a^5 b^2 B+24 a^4 A b^3-4 a^3 b^4 B+16 a^2 A b^5-a b^6 B+4 A b^7\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{a^5 d \left (a^2+b^2\right )^4}-\frac {A \cot (c+d x)}{a d (a+b \tan (c+d x))^3} \]
[In]
[Out]
Rule 3556
Rule 3611
Rule 3690
Rule 3730
Rule 3732
Rubi steps \begin{align*} \text {integral}& = -\frac {A \cot (c+d x)}{a d (a+b \tan (c+d x))^3}-\frac {\int \frac {\cot (c+d x) \left (4 A b-a B+a A \tan (c+d x)+4 A b \tan ^2(c+d x)\right )}{(a+b \tan (c+d x))^4} \, dx}{a} \\ & = -\frac {b \left (3 a^2 A+4 A b^2-a b B\right )}{3 a^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}-\frac {A \cot (c+d x)}{a d (a+b \tan (c+d x))^3}-\frac {\int \frac {\cot (c+d x) \left (3 \left (a^2+b^2\right ) (4 A b-a B)+3 a^2 (a A+b B) \tan (c+d x)+3 b \left (3 a^2 A+4 A b^2-a b B\right ) \tan ^2(c+d x)\right )}{(a+b \tan (c+d x))^3} \, dx}{3 a^2 \left (a^2+b^2\right )} \\ & = -\frac {b \left (3 a^2 A+4 A b^2-a b B\right )}{3 a^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}-\frac {A \cot (c+d x)}{a d (a+b \tan (c+d x))^3}-\frac {b \left (2 a^4 A+8 a^2 A b^2+4 A b^4-3 a^3 b B-a b^3 B\right )}{2 a^3 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}-\frac {\int \frac {\cot (c+d x) \left (6 \left (a^2+b^2\right )^2 (4 A b-a B)+6 a^3 \left (a^2 A-A b^2+2 a b B\right ) \tan (c+d x)+6 b \left (2 a^4 A+8 a^2 A b^2+4 A b^4-3 a^3 b B-a b^3 B\right ) \tan ^2(c+d x)\right )}{(a+b \tan (c+d x))^2} \, dx}{6 a^3 \left (a^2+b^2\right )^2} \\ & = -\frac {b \left (3 a^2 A+4 A b^2-a b B\right )}{3 a^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}-\frac {A \cot (c+d x)}{a d (a+b \tan (c+d x))^3}-\frac {b \left (2 a^4 A+8 a^2 A b^2+4 A b^4-3 a^3 b B-a b^3 B\right )}{2 a^3 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}-\frac {b \left (a^6 A+13 a^4 A b^2+12 a^2 A b^4+4 A b^6-6 a^5 b B-3 a^3 b^3 B-a b^5 B\right )}{a^4 \left (a^2+b^2\right )^3 d (a+b \tan (c+d x))}-\frac {\int \frac {\cot (c+d x) \left (6 \left (a^2+b^2\right )^3 (4 A b-a B)+6 a^4 \left (a^3 A-3 a A b^2+3 a^2 b B-b^3 B\right ) \tan (c+d x)+6 b \left (a^6 A+13 a^4 A b^2+12 a^2 A b^4+4 A b^6-6 a^5 b B-3 a^3 b^3 B-a b^5 B\right ) \tan ^2(c+d x)\right )}{a+b \tan (c+d x)} \, dx}{6 a^4 \left (a^2+b^2\right )^3} \\ & = -\frac {\left (a^4 A-6 a^2 A b^2+A b^4+4 a^3 b B-4 a b^3 B\right ) x}{\left (a^2+b^2\right )^4}-\frac {b \left (3 a^2 A+4 A b^2-a b B\right )}{3 a^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}-\frac {A \cot (c+d x)}{a d (a+b \tan (c+d x))^3}-\frac {b \left (2 a^4 A+8 a^2 A b^2+4 A b^4-3 a^3 b B-a b^3 B\right )}{2 a^3 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}-\frac {b \left (a^6 A+13 a^4 A b^2+12 a^2 A b^4+4 A b^6-6 a^5 b B-3 a^3 b^3 B-a b^5 B\right )}{a^4 \left (a^2+b^2\right )^3 d (a+b \tan (c+d x))}-\frac {(4 A b-a B) \int \cot (c+d x) \, dx}{a^5}+\frac {\left (b^2 \left (20 a^6 A b+24 a^4 A b^3+16 a^2 A b^5+4 A b^7-10 a^7 B-5 a^5 b^2 B-4 a^3 b^4 B-a b^6 B\right )\right ) \int \frac {b-a \tan (c+d x)}{a+b \tan (c+d x)} \, dx}{a^5 \left (a^2+b^2\right )^4} \\ & = -\frac {\left (a^4 A-6 a^2 A b^2+A b^4+4 a^3 b B-4 a b^3 B\right ) x}{\left (a^2+b^2\right )^4}-\frac {(4 A b-a B) \log (\sin (c+d x))}{a^5 d}+\frac {b^2 \left (20 a^6 A b+24 a^4 A b^3+16 a^2 A b^5+4 A b^7-10 a^7 B-5 a^5 b^2 B-4 a^3 b^4 B-a b^6 B\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{a^5 \left (a^2+b^2\right )^4 d}-\frac {b \left (3 a^2 A+4 A b^2-a b B\right )}{3 a^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}-\frac {A \cot (c+d x)}{a d (a+b \tan (c+d x))^3}-\frac {b \left (2 a^4 A+8 a^2 A b^2+4 A b^4-3 a^3 b B-a b^3 B\right )}{2 a^3 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}-\frac {b \left (a^6 A+13 a^4 A b^2+12 a^2 A b^4+4 A b^6-6 a^5 b B-3 a^3 b^3 B-a b^5 B\right )}{a^4 \left (a^2+b^2\right )^3 d (a+b \tan (c+d x))} \\ \end{align*}
Result contains complex when optimal does not.
Time = 6.58 (sec) , antiderivative size = 357, normalized size of antiderivative = 0.89 \[ \int \frac {\cot ^2(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=\frac {-\frac {6 A \cot (c+d x)}{a^4}+\frac {3 i (A+i B) \log (i-\tan (c+d x))}{(a+i b)^4}+\frac {6 (-4 A b+a B) \log (\tan (c+d x))}{a^5}-\frac {3 (i A+B) \log (i+\tan (c+d x))}{(a-i b)^4}-\frac {6 b^2 \left (-20 a^6 A b-24 a^4 A b^3-16 a^2 A b^5-4 A b^7+10 a^7 B+5 a^5 b^2 B+4 a^3 b^4 B+a b^6 B\right ) \log (a+b \tan (c+d x))}{a^5 \left (a^2+b^2\right )^4}+\frac {2 b^2 (-A b+a B)}{a^2 \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}+\frac {3 b^2 \left (-4 a^2 A b-2 A b^3+3 a^3 B+a b^2 B\right )}{a^3 \left (a^2+b^2\right )^2 (a+b \tan (c+d x))^2}+\frac {6 b^2 \left (-10 a^4 A b-9 a^2 A b^3-3 A b^5+6 a^5 B+3 a^3 b^2 B+a b^4 B\right )}{a^4 \left (a^2+b^2\right )^3 (a+b \tan (c+d x))}}{6 d} \]
[In]
[Out]
Time = 1.34 (sec) , antiderivative size = 400, normalized size of antiderivative = 1.00
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (4 A \,a^{3} b -4 A a \,b^{3}-B \,a^{4}+6 B \,a^{2} b^{2}-B \,b^{4}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (-A \,a^{4}+6 A \,a^{2} b^{2}-A \,b^{4}-4 B \,a^{3} b +4 B a \,b^{3}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{4}}-\frac {A}{a^{4} \tan \left (d x +c \right )}+\frac {\left (-4 A b +B a \right ) \ln \left (\tan \left (d x +c \right )\right )}{a^{5}}-\frac {b^{2} \left (4 A \,a^{2} b +2 A \,b^{3}-3 B \,a^{3}-B a \,b^{2}\right )}{2 \left (a^{2}+b^{2}\right )^{2} a^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}}-\frac {b^{2} \left (10 A \,a^{4} b +9 A \,a^{2} b^{3}+3 A \,b^{5}-6 B \,a^{5}-3 B \,a^{3} b^{2}-B a \,b^{4}\right )}{\left (a^{2}+b^{2}\right )^{3} a^{4} \left (a +b \tan \left (d x +c \right )\right )}+\frac {b^{2} \left (20 A \,a^{6} b +24 A \,a^{4} b^{3}+16 A \,a^{2} b^{5}+4 A \,b^{7}-10 B \,a^{7}-5 B \,a^{5} b^{2}-4 B \,a^{3} b^{4}-B a \,b^{6}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{4} a^{5}}-\frac {\left (A b -B a \right ) b^{2}}{3 \left (a^{2}+b^{2}\right ) a^{2} \left (a +b \tan \left (d x +c \right )\right )^{3}}}{d}\) | \(400\) |
default | \(\frac {\frac {\frac {\left (4 A \,a^{3} b -4 A a \,b^{3}-B \,a^{4}+6 B \,a^{2} b^{2}-B \,b^{4}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (-A \,a^{4}+6 A \,a^{2} b^{2}-A \,b^{4}-4 B \,a^{3} b +4 B a \,b^{3}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{4}}-\frac {A}{a^{4} \tan \left (d x +c \right )}+\frac {\left (-4 A b +B a \right ) \ln \left (\tan \left (d x +c \right )\right )}{a^{5}}-\frac {b^{2} \left (4 A \,a^{2} b +2 A \,b^{3}-3 B \,a^{3}-B a \,b^{2}\right )}{2 \left (a^{2}+b^{2}\right )^{2} a^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}}-\frac {b^{2} \left (10 A \,a^{4} b +9 A \,a^{2} b^{3}+3 A \,b^{5}-6 B \,a^{5}-3 B \,a^{3} b^{2}-B a \,b^{4}\right )}{\left (a^{2}+b^{2}\right )^{3} a^{4} \left (a +b \tan \left (d x +c \right )\right )}+\frac {b^{2} \left (20 A \,a^{6} b +24 A \,a^{4} b^{3}+16 A \,a^{2} b^{5}+4 A \,b^{7}-10 B \,a^{7}-5 B \,a^{5} b^{2}-4 B \,a^{3} b^{4}-B a \,b^{6}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{4} a^{5}}-\frac {\left (A b -B a \right ) b^{2}}{3 \left (a^{2}+b^{2}\right ) a^{2} \left (a +b \tan \left (d x +c \right )\right )^{3}}}{d}\) | \(400\) |
norman | \(\frac {\frac {b \left (6 A \,a^{6} b +33 A \,a^{4} b^{3}+35 A \,a^{2} b^{5}+12 A \,b^{7}-10 B \,a^{5} b^{2}-9 B \,a^{3} b^{4}-3 B a \,b^{6}\right ) \left (\tan ^{2}\left (d x +c \right )\right )}{d \,a^{3} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {A}{a d}-\frac {b^{3} \left (A \,a^{4}-6 A \,a^{2} b^{2}+A \,b^{4}+4 B \,a^{3} b -4 B a \,b^{3}\right ) x \left (\tan ^{4}\left (d x +c \right )\right )}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}+\frac {b^{2} \left (16 A \,a^{6} b +102 A \,a^{4} b^{3}+106 A \,a^{2} b^{5}+36 A \,b^{7}-35 B \,a^{5} b^{2}-28 B \,a^{3} b^{4}-9 B a \,b^{6}\right ) \left (\tan ^{3}\left (d x +c \right )\right )}{2 d \,a^{4} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {b^{3} \left (18 A \,a^{6} b +128 A \,a^{4} b^{3}+130 A \,a^{2} b^{5}+44 A \,b^{7}-47 B \,a^{5} b^{2}-34 B \,a^{3} b^{4}-11 B a \,b^{6}\right ) \left (\tan ^{4}\left (d x +c \right )\right )}{6 d \,a^{5} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {\left (A \,a^{4}-6 A \,a^{2} b^{2}+A \,b^{4}+4 B \,a^{3} b -4 B a \,b^{3}\right ) a^{3} x \tan \left (d x +c \right )}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}-\frac {3 b \left (A \,a^{4}-6 A \,a^{2} b^{2}+A \,b^{4}+4 B \,a^{3} b -4 B a \,b^{3}\right ) a^{2} x \left (\tan ^{2}\left (d x +c \right )\right )}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}-\frac {3 b^{2} \left (A \,a^{4}-6 A \,a^{2} b^{2}+A \,b^{4}+4 B \,a^{3} b -4 B a \,b^{3}\right ) a x \left (\tan ^{3}\left (d x +c \right )\right )}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) \left (a^{2}+b^{2}\right )}}{\tan \left (d x +c \right ) \left (a +b \tan \left (d x +c \right )\right )^{3}}+\frac {b^{2} \left (20 A \,a^{6} b +24 A \,a^{4} b^{3}+16 A \,a^{2} b^{5}+4 A \,b^{7}-10 B \,a^{7}-5 B \,a^{5} b^{2}-4 B \,a^{3} b^{4}-B a \,b^{6}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{\left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}\right ) a^{5} d}-\frac {\left (4 A b -B a \right ) \ln \left (\tan \left (d x +c \right )\right )}{a^{5} d}+\frac {\left (4 A \,a^{3} b -4 A a \,b^{3}-B \,a^{4}+6 B \,a^{2} b^{2}-B \,b^{4}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d \left (a^{8}+4 a^{6} b^{2}+6 a^{4} b^{4}+4 a^{2} b^{6}+b^{8}\right )}\) | \(887\) |
parallelrisch | \(\text {Expression too large to display}\) | \(1195\) |
risch | \(\text {Expression too large to display}\) | \(2584\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1510 vs. \(2 (393) = 786\).
Time = 0.44 (sec) , antiderivative size = 1510, normalized size of antiderivative = 3.78 \[ \int \frac {\cot ^2(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=\text {Too large to display} \]
[In]
[Out]
Exception generated. \[ \int \frac {\cot ^2(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=\text {Exception raised: AttributeError} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 698, normalized size of antiderivative = 1.75 \[ \int \frac {\cot ^2(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=-\frac {\frac {6 \, {\left (A a^{4} + 4 \, B a^{3} b - 6 \, A a^{2} b^{2} - 4 \, B a b^{3} + A b^{4}\right )} {\left (d x + c\right )}}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} + \frac {6 \, {\left (10 \, B a^{7} b^{2} - 20 \, A a^{6} b^{3} + 5 \, B a^{5} b^{4} - 24 \, A a^{4} b^{5} + 4 \, B a^{3} b^{6} - 16 \, A a^{2} b^{7} + B a b^{8} - 4 \, A b^{9}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{13} + 4 \, a^{11} b^{2} + 6 \, a^{9} b^{4} + 4 \, a^{7} b^{6} + a^{5} b^{8}} + \frac {3 \, {\left (B a^{4} - 4 \, A a^{3} b - 6 \, B a^{2} b^{2} + 4 \, A a b^{3} + B b^{4}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} + \frac {6 \, A a^{9} + 18 \, A a^{7} b^{2} + 18 \, A a^{5} b^{4} + 6 \, A a^{3} b^{6} + 6 \, {\left (A a^{6} b^{3} - 6 \, B a^{5} b^{4} + 13 \, A a^{4} b^{5} - 3 \, B a^{3} b^{6} + 12 \, A a^{2} b^{7} - B a b^{8} + 4 \, A b^{9}\right )} \tan \left (d x + c\right )^{3} + 3 \, {\left (6 \, A a^{7} b^{2} - 27 \, B a^{6} b^{3} + 62 \, A a^{5} b^{4} - 16 \, B a^{4} b^{5} + 60 \, A a^{3} b^{6} - 5 \, B a^{2} b^{7} + 20 \, A a b^{8}\right )} \tan \left (d x + c\right )^{2} + {\left (18 \, A a^{8} b - 47 \, B a^{7} b^{2} + 128 \, A a^{6} b^{3} - 34 \, B a^{5} b^{4} + 130 \, A a^{4} b^{5} - 11 \, B a^{3} b^{6} + 44 \, A a^{2} b^{7}\right )} \tan \left (d x + c\right )}{{\left (a^{10} b^{3} + 3 \, a^{8} b^{5} + 3 \, a^{6} b^{7} + a^{4} b^{9}\right )} \tan \left (d x + c\right )^{4} + 3 \, {\left (a^{11} b^{2} + 3 \, a^{9} b^{4} + 3 \, a^{7} b^{6} + a^{5} b^{8}\right )} \tan \left (d x + c\right )^{3} + 3 \, {\left (a^{12} b + 3 \, a^{10} b^{3} + 3 \, a^{8} b^{5} + a^{6} b^{7}\right )} \tan \left (d x + c\right )^{2} + {\left (a^{13} + 3 \, a^{11} b^{2} + 3 \, a^{9} b^{4} + a^{7} b^{6}\right )} \tan \left (d x + c\right )} - \frac {6 \, {\left (B a - 4 \, A b\right )} \log \left (\tan \left (d x + c\right )\right )}{a^{5}}}{6 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 846 vs. \(2 (393) = 786\).
Time = 1.31 (sec) , antiderivative size = 846, normalized size of antiderivative = 2.12 \[ \int \frac {\cot ^2(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=-\frac {\frac {6 \, {\left (A a^{4} + 4 \, B a^{3} b - 6 \, A a^{2} b^{2} - 4 \, B a b^{3} + A b^{4}\right )} {\left (d x + c\right )}}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} + \frac {3 \, {\left (B a^{4} - 4 \, A a^{3} b - 6 \, B a^{2} b^{2} + 4 \, A a b^{3} + B b^{4}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{8} + 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} + 4 \, a^{2} b^{6} + b^{8}} + \frac {6 \, {\left (10 \, B a^{7} b^{3} - 20 \, A a^{6} b^{4} + 5 \, B a^{5} b^{5} - 24 \, A a^{4} b^{6} + 4 \, B a^{3} b^{7} - 16 \, A a^{2} b^{8} + B a b^{9} - 4 \, A b^{10}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{13} b + 4 \, a^{11} b^{3} + 6 \, a^{9} b^{5} + 4 \, a^{7} b^{7} + a^{5} b^{9}} - \frac {110 \, B a^{7} b^{5} \tan \left (d x + c\right )^{3} - 220 \, A a^{6} b^{6} \tan \left (d x + c\right )^{3} + 55 \, B a^{5} b^{7} \tan \left (d x + c\right )^{3} - 264 \, A a^{4} b^{8} \tan \left (d x + c\right )^{3} + 44 \, B a^{3} b^{9} \tan \left (d x + c\right )^{3} - 176 \, A a^{2} b^{10} \tan \left (d x + c\right )^{3} + 11 \, B a b^{11} \tan \left (d x + c\right )^{3} - 44 \, A b^{12} \tan \left (d x + c\right )^{3} + 366 \, B a^{8} b^{4} \tan \left (d x + c\right )^{2} - 720 \, A a^{7} b^{5} \tan \left (d x + c\right )^{2} + 219 \, B a^{6} b^{6} \tan \left (d x + c\right )^{2} - 906 \, A a^{5} b^{7} \tan \left (d x + c\right )^{2} + 156 \, B a^{4} b^{8} \tan \left (d x + c\right )^{2} - 600 \, A a^{3} b^{9} \tan \left (d x + c\right )^{2} + 39 \, B a^{2} b^{10} \tan \left (d x + c\right )^{2} - 150 \, A a b^{11} \tan \left (d x + c\right )^{2} + 411 \, B a^{9} b^{3} \tan \left (d x + c\right ) - 792 \, A a^{8} b^{4} \tan \left (d x + c\right ) + 294 \, B a^{7} b^{5} \tan \left (d x + c\right ) - 1050 \, A a^{6} b^{6} \tan \left (d x + c\right ) + 195 \, B a^{5} b^{7} \tan \left (d x + c\right ) - 696 \, A a^{4} b^{8} \tan \left (d x + c\right ) + 48 \, B a^{3} b^{9} \tan \left (d x + c\right ) - 174 \, A a^{2} b^{10} \tan \left (d x + c\right ) + 157 \, B a^{10} b^{2} - 294 \, A a^{9} b^{3} + 136 \, B a^{8} b^{4} - 414 \, A a^{7} b^{5} + 89 \, B a^{6} b^{6} - 278 \, A a^{5} b^{7} + 22 \, B a^{4} b^{8} - 70 \, A a^{3} b^{9}}{{\left (a^{13} + 4 \, a^{11} b^{2} + 6 \, a^{9} b^{4} + 4 \, a^{7} b^{6} + a^{5} b^{8}\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{3}} - \frac {6 \, {\left (B a - 4 \, A b\right )} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{a^{5}} + \frac {6 \, {\left (B a \tan \left (d x + c\right ) - 4 \, A b \tan \left (d x + c\right ) + A a\right )}}{a^{5} \tan \left (d x + c\right )}}{6 \, d} \]
[In]
[Out]
Time = 12.85 (sec) , antiderivative size = 576, normalized size of antiderivative = 1.44 \[ \int \frac {\cot ^2(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=\frac {b^2\,\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )\,\left (-10\,B\,a^7+20\,A\,a^6\,b-5\,B\,a^5\,b^2+24\,A\,a^4\,b^3-4\,B\,a^3\,b^4+16\,A\,a^2\,b^5-B\,a\,b^6+4\,A\,b^7\right )}{a^5\,d\,{\left (a^2+b^2\right )}^4}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )\,\left (4\,A\,b-B\,a\right )}{a^5\,d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,\left (A+B\,1{}\mathrm {i}\right )}{2\,d\,\left (a^4\,1{}\mathrm {i}-4\,a^3\,b-a^2\,b^2\,6{}\mathrm {i}+4\,a\,b^3+b^4\,1{}\mathrm {i}\right )}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (B+A\,1{}\mathrm {i}\right )}{2\,d\,\left (a^4-a^3\,b\,4{}\mathrm {i}-6\,a^2\,b^2+a\,b^3\,4{}\mathrm {i}+b^4\right )}-\frac {\frac {A}{a}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (A\,a^6\,b^3-6\,B\,a^5\,b^4+13\,A\,a^4\,b^5-3\,B\,a^3\,b^6+12\,A\,a^2\,b^7-B\,a\,b^8+4\,A\,b^9\right )}{a^4\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (6\,A\,a^6\,b^2-27\,B\,a^5\,b^3+62\,A\,a^4\,b^4-16\,B\,a^3\,b^5+60\,A\,a^2\,b^6-5\,B\,a\,b^7+20\,A\,b^8\right )}{2\,a^3\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}+\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (18\,A\,a^6\,b-47\,B\,a^5\,b^2+128\,A\,a^4\,b^3-34\,B\,a^3\,b^4+130\,A\,a^2\,b^5-11\,B\,a\,b^6+44\,A\,b^7\right )}{6\,a^2\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}}{d\,\left (a^3\,\mathrm {tan}\left (c+d\,x\right )+3\,a^2\,b\,{\mathrm {tan}\left (c+d\,x\right )}^2+3\,a\,b^2\,{\mathrm {tan}\left (c+d\,x\right )}^3+b^3\,{\mathrm {tan}\left (c+d\,x\right )}^4\right )} \]
[In]
[Out]